#pragma once

//////////////////////////////////////////////////////////////////////////
//
// Constant buffers used in DirectX shaders.
// Constant buffers should be 16 bytes aligned.
//
//////////////////////////////////////////////////////////////////////////

#include <cstdint>
#include <DirectXMath.h>

#include "utils/BufferData.h"

namespace emitterScene {
	struct Settings;

	//
	// Compute Shader
	//
	struct CSImmutableBuffer {
		uint32_t mDispatchGroupsY;
		float mPad[3];
	};

	//
	// Geometry Shader
	//
	struct GSPerFrameBuffer {
		// Entity view projection matrix
		DirectX::XMFLOAT4X4A mView;
		DirectX::XMFLOAT4X4A mProj;
	};

	struct ConstantBuffers {
		// Compute shader constant buffers
		BufferData<emitterScene::CSImmutableBuffer> mCSImmutableBuffer;

		// Geometry shader constant buffers
		BufferData<emitterScene::GSPerFrameBuffer> mGSPerFrameBuffer;

		ConstantBuffers(const Settings& settings);
	};
}
